from socket import *
import time
ip_port = ("localhost", 51590)
buffer_size = 1024
udp_server = socket(AF_INET, SOCK_DGRAM)

udp_server.bind(ip_port)
while True:
    print("waiting for recv message....")
    data,addr =udp_server.recvfrom(buffer_size)
    print(time.ctime(),"from clent msg is:",data.decode("utf-8"))
    udp_server.sendto(data.upper(),addr)